package jmine.tec.test.entities.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;

import org.hibernate.annotations.Type;
import org.hibernate.validator.NotNull;

import bancosys.tec.component.Documentation;
import bancosys.tec.persist.bussobj.PersistableBusinessObject;
import bancosys.tec.utils.date.Date;

/**
 * @author piercio
 */
@Entity
@Table(name = "DATA_VALOR")
@Alias("DTVAL")
@SequenceGenerator(name = "SEQ_DTVAL", sequenceName = "SEQ_DTVAL")
@Documentation("TABELA DE TESTES.")
public class DataValor extends PersistableBusinessObject {

    private Date data;

    private Integer valor;

    private Long id;

    /**
     * {@inheritDoc}
     */
    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_DTVAL")
    @Documentation("TABELA DE TESTES.")
    public Long getId() {
        return this.id;
    }

    /**
     * {@inheritDoc}
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return o valor do campo data.
     */
    @Column(name = "DATA")
    @NotNull
    @Type(type = "bancosys.tec.persist.hibernate.type.DateType")
    @Documentation("TABELA DE TESTES.")
    public Date getData() {
        return this.data;
    }

    /**
     * Define o valor do campo data.
     * 
     * @param data o valor para o campo data.
     */
    public void setData(Date data) {
        this.data = data;
    }

    /**
     * @return o valor do campo valor.
     */
    @Column(name = "VALOR")
    @NotNull
    @Documentation("TABELA DE TESTES.")
    public Integer getValor() {
        return this.valor;
    }

    /**
     * Define o valor do campo valor.
     * 
     * @param valor o valor para o campo valor.
     */
    public void setValor(Integer valor) {
        this.valor = valor;
    }

}
